home *** CD-ROM | disk | FTP | other *** search
- #
- # showprocs.test
- #
- # Tests for tcl.tlib showproc routines.
- #---------------------------------------------------------------------------
- # Copyright 1992 Karl Lehenbauer and Mark Diekhans.
- #
- # Permission to use, copy, modify, and distribute this software and its
- # documentation for any purpose and without fee is hereby granted, provided
- # that the above copyright notice appear in all copies. Karl Lehenbauer and
- # Mark Diekhans make no representations about the suitability of this
- # software for any purpose. It is provided "as is" without express or
- # implied warranty.
- #------------------------------------------------------------------------------
- # $Id: showprocs.test,v 2.0 1992/10/16 04:50:15 markd Rel $
- #------------------------------------------------------------------------------
- #
-
- if {[info procs test] == ""} then {source testlib.tcl}
-
- rename SAVED_UNKNOWN unknown
-
- set testProcVar {proc testproc {testVar} {
- return 1
- }}
-
- eval $testProcVar
-
- test showproc-1.1 {showproc command} {
- showproc testproc
- } "$testProcVar\n"
-
- test showprocs-1.1 {showprocs command} {
- showprocs testproc
- } "$testProcVar\n\n"
-
- test showprocs-1.2 {showprocs command} {
- set result ""
- foreach i [split [showprocs] "\n"] {
- if {[lindex $i 0] == "proc"} {
- lappend result [lindex $i 1]
- }
- }
- lsort $result
- } [lsort [info procs]]
-
- unset testProcVar
- rename testproc ""
- rename unknown SAVED_UNKNOWN
-